<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">

		<title>Yong餐厅后台</title>

		<!-- 公共样式 开始 -->
		<link rel="shortcut icon" href="../static/images/favicon.ico"/>
		<link rel="bookmark" href="../static/images/favicon.ico"/>
		<link rel="stylesheet" type="text/css" href="../static/css/base.css">
		<link rel="stylesheet" type="text/css" href="../static/css/iconfont.css">
		<script type="text/javascript" src="../static/framework/jquery-1.11.3.min.js"></script>
		<link rel="stylesheet" type="text/css" href="../static/layui/css/layui.css">
		<script type="text/javascript" src="../static/layui/layui.js"></script>
		<!-- 公共样式 结束 -->
		
		<link rel="stylesheet" type="text/css" href="../static/css/login1.css">
		<script type="text/javascript" src="../static/js/login1.js"></script>
	</head>

	<body>
		<div class="loginBg"></div>
		<div class="login_main">
			<div class="box">
				<div class="left">
					<img src="../static/img/logo.jpg" />
					<p>Yong后台管理</p>
				</div>
				<div class="right">
					<form class="layui-form layui-form-pane" action="/denglu1" method="post">
						<div class="layui-form-item">
							<label class="layui-form-label login_title"><i class="iconfont icon-gerenzhongxin-denglu"></i></label>
							<div class="layui-input-block login_input">
								<input type="text" name="user" required lay-verify="required" autocomplete="off" placeholder="请输入您的用户名" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label login_title"><i class="iconfont icon-mima1"></i></label>
							<div class="layui-input-block login_input">
								<input type="password" name="password" required lay-verify="required" autocomplete="off" placeholder="请输入密码" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<button class="layui-btn layui-btn-fluid login_but" lay-submit lay-filter="loginBut" type="submit">登 录</button>
						</div>
						<div class="layui-form-item">
							<input type="radio" name="sex" value="管理员" title="管理员" checked lay-filter="userType">
							<input type="radio" name="sex" value="技术" title="技术" lay-filter="userType">
							<input type="radio" name="sex" value="实施" title="实施" lay-filter="userType">
						</div>
					</form>
				</div>
			</div>
		</div>
		<script>
			layui.use('form', function() {
				var form = layui.form;
				//监听提交
				form.on('submit(loginBut)', function(data) {
					layer.msg(JSON.stringify(data.field));
					return true;
				});
				//监听用户类型，改变风格
				form.on('radio(userType)', function(data){
					if(data.value == "管理员"){
						$(".loginBg").css("background","url('../static/images/login_admin_bg.jpg')");
						$(".login_but").css("cssText", "background-color:#57c201 !important");
					}
					if(data.value == "技术"){
						$(".loginBg").css("background","url('../static/images/login_sh_bg.jpg')");
						$(".login_but").css("cssText", "background-color:#16c6f9 !important");
					}
					if(data.value == "实施"){
						$(".loginBg").css("background","url('../static/images/login_fj_bg.jpg')");
						$(".login_but").css("cssText", "background-color:#ffd205 !important");
					}
				});
			});
		</script>
	</body>

</html>